<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
</head>

<body>
    <script src="./lib/axios.min.js"></script>
    <script>
        // axios({
        //     method: 'get',
        //     url: 'http://www.liulongbin.top:3006/api/get',
        //     params: {
        //         id: 1,
        //         bookname: 'ss',
        //     },
        // }).then(function(res) {
        //     console.log(res);
        // });
        var fd = new URLSearchParams();
        fd.append(('uname', 'zhangsan'));
        fd.append(('pwd', '123'));
        axios({
            method: 'post',
            url: 'http://www.liulongbin.top:3006/api/post',
            // data: {
            //     id: 245,
            //     uname: 'zhangsan',
            //     age: 25,
            // },
            data: fd,
        }).then(function(res) {
            console.log(res);
        });
    </script>
</body>

</html>